﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UnityMultiPlayerGameServer.Manager
{
    internal class ServerManager
    {
        private static readonly object locker = new object();
        private static ServerManager instance;
        public static ServerManager Instance
        {
            get
            {
                if (instance == null)
                {
                    lock (locker)
                    {
                        if (instance == null)
                        {
                            instance = new ServerManager();
                        }
                    }

                }
                return instance;
            }
        }

        private Server server;
        private Server_UDP server_UDP;

        internal Server Server { get => server; }
        internal Server_UDP Server_UDP { get => server_UDP; }

        public void SetTCPUDP(Server server, Server_UDP server_UDP)
        {
            this.server = server;
            this.server_UDP = server_UDP;
        }
    }
}
